<template>
  <demoBlock title="通知类型">
    <vcu-cell is-link title="主要通知" @click="showType('primary')" />
    <vcu-cell is-link title="成功通知" @click="showType('success')" />
    <vcu-cell is-link title="危险通知" @click="showType('danger')" />
    <vcu-cell is-link title="警告通知" @click="showType('warning')" />
  </demoBlock>
</template>

<script>
import { defineComponent, ref } from "vue";
import { Notify } from "../../../components/index";
export default defineComponent({
  setup() {
    const text = {
      primary: "主要通知",
      success: "成功通知",
      danger: "危险通知",
      warning: "警告通知",
    };
    const showType = (type) => {
      Notify({
        message: text[type],
        type,
      });
    };
    return { showType };
  },
});
</script>
